package com.heima.config;

import feign.Logger;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * @Author XHui
 * @Since 2024/2/5 12:20
 * @Version 1.0
 */
@Configuration
@EnableFeignClients(basePackages = "com.heima.feigns") // 在哪些包下启用feign
@ComponentScan("com.heima.feigns.fallback")
public class HeimaFeignAutoConfiguration {

    /**
     * 定义feign的日志界别
     *
     * @return 记录。水平
     */
    @Bean
    Logger.Level level() {
        return Logger.Level.FULL;
    }
}


